<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/base/fileinput.min.css" />
	<link href="css/assets/css/bootstrap.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="css/assets/css/font-awesome.min.css" />
	<!--[if IE 7]>
	<link rel="stylesheet" href="css/assets/css/font-awesome-ie7.min.css" />
	<![endif]-->
	<link rel="stylesheet" href="css/assets/css/ace.min.css" />
	<link rel="stylesheet" href="css/assets/css/ace-rtl.min.css" />
	<link rel="stylesheet" href="css/assets/css/ace-skins.min.css" />
	<link rel="stylesheet" href="css/style.css"/>
	<!--[if lte IE 8]>
	<link rel="stylesheet" href="css/assets/css/ace-ie.min.css" />
	<![endif]-->
	<script src="css/assets/js/ace-extra.min.js"></script>
	<!--[if lt IE 9]>
	<script src="css/assets/js/html5shiv.js"></script>
	<script src="css/assets/js/respond.min.js"></script>
	<![endif]-->
	<script src="js/jquery-1.9.1.min.js"></script>
	<script src="css/assets/layer/layer.js" type="text/javascript"></script>
	<script src="css/base/fileinput.min.css" type="text/javascript"></script>
	<title>登录</title>
</head>

<body class="login-layout Reg_log_style">
<div class="logintop">
	<span>欢迎后台管理界面平台</span>
	<ul>
		<li><a href="#">返回首页</a></li>
		<li><a href="#">帮助</a></li>
		<li><a href="#">关于</a></li>
	</ul>
</div>
<div class="loginbody">
	<div class="login-container">
		<div class="center">
			<img src="images/logo1.png" />
		</div>

		<div class="space-6"></div>

		<div class="position-relative">
			<div id="login-box" class="login-box widget-box no-border visible">
				<div class="widget-body">
					<div class="widget-main">
						<h4 class="header blue lighter bigger">
							<i class="icon-coffee green"></i>
							用户登录
						</h4>

						<div class="login_icon"><img src="images/login.png" /></div>

						<form class="" action="/toLogin.do" method="get" >
							<fieldset>
								<ul>
									<li class="frame_style form_error"><label class="user_icon"></label><input name="userName" type="text"  id="username"/><i>用户名</i></li>
									<li class="frame_style form_error"><label class="password_icon"></label><input name="password" type="password"   id="userpwd"/><i>密码</i></li>
									<li class="frame_style form_error"><label class="Codes_icon"></label><input name="验证码" type="text"   id="Codes_text"/><i>验证码</i><div class="Codes_region"></div></li>

								</ul>
								<div class="space"></div>

								<div class="clearfix">
									<label class="inline">
										<input type="checkbox" class="ace">
										<span class="lbl">保存密码</span>
									</label>
									<button type="button" class="width-35 pull-right btn btn-sm btn-primary" id="register_btn">
										<i class="icon-key"></i>
										注册
									</button>
									<button type="submit" class="width-35 pull-right btn btn-sm btn-primary" id="login_btn">
										<i class="icon-key"></i>
										登录
									</button>
								</div>

								<div class="space-4"></div>
							</fieldset>
						</form>

						<div class="social-or-login center">
												<span class="bigger-110">
													<%= session.getAttribute("result") %>
												</span>
						</div>

						<div class="social-login center">
							本网站系统不再对IE8以下浏览器支持，请见谅。
						</div>
					</div><!-- /widget-main -->

					<div class="toolbar clearfix">



					</div>
				</div><!-- /widget-body -->
			</div><!-- /login-box -->
		</div><!-- /position-relative -->
	</div>
</div>
<div class="loginbm">版权所有  2016  <a href="">南京思美软件系统有限公司</a> </div><strong></strong>

<!--注册账户-->

<div class="register_user" id="register_user">
	<form action="/register.do" method="post" enctype="multipart/form-data">
		<div class="reg_left">
			<ul class="xg_style reg_user_info">
				<p>账户信息</p>
				<li><label class="label_name">账&nbsp;&nbsp;&nbsp;号&nbsp;</label><input name="userName" type="text" class="" id="password"></li>
				<li><label class="label_name">密&nbsp;&nbsp;&nbsp;码&nbsp;</label><input name="password" type="text" class="" id="Nes_pas"></li>
				<li><label class="label_name">姓&nbsp;&nbsp;&nbsp;名&nbsp;</label><input type="text" name="name"></li>
				<li><label class="label_name layui-input-block">性&nbsp;&nbsp;&nbsp;别&nbsp;</label><input type="radio" class="sex" name="sex" value="男"> 男<input type="radio" class="sex" name="sex" value="女"> 女</li>
				<li><label class="label_name">专&nbsp;&nbsp;&nbsp;业&nbsp;</label><input name="major" type="text" class="" ></li>
				<li><label class="label_name">籍&nbsp;&nbsp;&nbsp;贯&nbsp;</label><input name="nativePlace" type="text" class="" ></li>
				<li><label class="label_name">注册邮箱&nbsp;</label><input name="eMail" type="text" class="" ></li>
				<li><label class="label_name">政治面貌&nbsp;</label><input name="political" type="text" class="" ></li>
				<li><label class="label_name">最高学历&nbsp;</label><input name="maxEducation" type="text" class="" ></li>
				<li><label class="label_name">毕业学校&nbsp;</label><input name="finishSchool" type="text" class="" ></li>
			</ul>
		</div>
		<div class="reg_right">
			<div class="user_head">
				<img src="" id="img0" style="width: 100%;height: 100%;">
			</div>
			<input type="file" class="btn btn-primary reg_img_btn" id="uploadImage" name="uploadImage" multiple="multiple" >
			<ul class="xg_style">
				<li><label class="label_name">证件类型&nbsp;</label><input name="certificateType" type="text" class="" ></li>
				<li><label class="label_name">证件号码&nbsp;</label><input name="certificateNo" type="text" class="" ></li>
				<li><label class="label_name">现居住地&nbsp;</label><input name="liveNow" type="text" class="" ></li>
				<li><label class="label_name">工作经历&nbsp;</label><input name="jobUndergo" type="text" class="" ></li>
				<li><label class="label_name">工作年限&nbsp;</label><input name="jobYears" type="text" class="" ></li>
			</ul>
		</div>
		<button class="btn btn-primary reg_btn">确认注册</button>
	</form>

</div>
</body>
</html>
<script>
    $("#uploadImage").change(function(){
        var objUrl = getObjectURL(this.files[0]) ;//获取文件信息
        console.log("objUrl = "+objUrl);
        if (objUrl) {
            $("#img0").attr("src", objUrl);
        }
    }) ;
    function getObjectURL(file) {
        var url = null;
        if (window.createObjectURL != undefined) {
            url = window.createObjectURL(file);
        } else if (window.URL != undefined) { // mozilla(firefox)
            url = window.URL.createObjectURL(file);
        } else if (window.webkitURL != undefined) { // webkit or chrome
            url = window.webkitURL.createObjectURL(file);
        }
        return url;
    }
        <!--注册-->
    $('#register_btn').on('click', function(){
        layer.open({
            type: 1,
            title:'注册账户',
            area: ['650px','720px'],
            shadeClose: true,
            content: $('#register_user'),
            yes:function(index, layero){
                if ($("#password").val()==""){
                    layer.alert('原密码不能为空!',{
                        title: '提示框',
                        icon:0,

                    });
                    return false;
                }
                if ($("#Nes_pas").val()==""){
                    layer.alert('新密码不能为空!',{
                        title: '提示框',
                        icon:0,

                    });
                    return false;
                }

                if ($("#c_mew_pas").val()==""){
                    layer.alert('确认新密码不能为空!',{
                        title: '提示框',
                        icon:0,

                    });
                    return false;
                }
                if(!$("#c_mew_pas").val || $("#c_mew_pas").val() != $("#Nes_pas").val() )
                {
                    layer.alert('密码不一致!',{
                        title: '提示框',
                        icon:0,

                    });
                    return false;
                }
                else{
                    layer.alert('修改成功！',{
                        title: '提示框',
                        icon:1,
                    });
                    layer.close(index);
                }
            }

		})
	});
    // $(document).ready(function(){
    //     $("input[type='text'],input[type='password']").blur(function(){
    //         var $el = $(this);
    //         var $parent = $el.parent();
    //         $parent.attr('class','frame_style').removeClass(' form_error');
    //         if($el.val()==''){
    //             $parent.attr('class','frame_style').addClass(' form_error');
    //         }
    //     });
    //     $("input[type='text'],input[type='password']").focus(function(){
    //         var $el = $(this);
    //         var $parent = $el.parent();
    //         $parent.attr('class','frame_style').removeClass(' form_errors');
    //         if($el.val()==''){
    //             $parent.attr('class','frame_style').addClass(' form_errors');
    //         } else{
    //             $parent.attr('class','frame_style').removeClass(' form_errors');
    //         }
    //     });
    // })

</script>